package io.renren.modules.frt.service.impl;

import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.frt.dao.MonitorHisDao;
import io.renren.modules.frt.entity.MonitorHisEntity;
import io.renren.modules.frt.service.MonitorHisService;


@Service("monitorHisService")
public class MonitorHisServiceImpl extends ServiceImpl<MonitorHisDao, MonitorHisEntity> implements MonitorHisService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<MonitorHisEntity> page = this.selectPage(
                new Query<MonitorHisEntity>(params).getPage(),
                new EntityWrapper<MonitorHisEntity>()
        );

        return new PageUtils(page);
    }
    
    @Override
	public List<Map<String, Object>> sumaryList(Long[] hisIds, List<String> list) {
		Map<String, Object> params = new HashMap<>();
    	params.put("hisIds", hisIds);
    	params.put("list", list);
    	return baseMapper.sumaryList(params);
	}

}
